import{withInstallDirective as t}from"@fast-china/utils";const e=t({mounted(t,e){if("function"!=typeof e.value)throw"callback must be a function";let n=null;const o=t=>{t.button&&"click"===t.type&&0!==t.button||null===n&&(n=setTimeout(()=>{(t=>{e.value(t)})(t)},1e3))},u=()=>{null!==n&&(clearTimeout(n),n=null)};t.addEventListener("mousedown",o),t.addEventListener("touchstart",o),t.addEventListener("click",u),t.addEventListener("mouseout",u),t.addEventListener("touchend",u),t.addEventListener("touchcancel",u)}},"longpress");export{e as default,e as vLongpress};
//# sourceMappingURL=index.mjs.map
